package com.wan37.logic.domain.vo;

import com.google.protobuf.Message;
import io.netty.channel.ChannelHandlerContext;

/**
 * 服务端收到网关消息体
 *
 * @author : luoyong
 * @date : 2020-06-08 11:28
 **/
public class MessageVO {

    private String userId;
    private Long netId;
    private Message message;
    private ChannelHandlerContext ctx;

    public MessageVO() {

    }

    public MessageVO(String userId) {
        this.userId = userId;
        this.netId = Long.valueOf(0);
    }

    public MessageVO(String userId, Long netId, Message message, ChannelHandlerContext ctx) {
        this.userId = userId;
        this.netId = netId;
        this.message = message;
        this.ctx = ctx;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public Long getNetId() {
        return netId;
    }

    public void setNetId(Long netId) {
        this.netId = netId;
    }

    public Message getMessage() {
        return message;
    }

    public void setMessage(Message message) {
        this.message = message;
    }

    public ChannelHandlerContext getCtx() {
        return ctx;
    }

    public void setCtx(ChannelHandlerContext ctx) {
        this.ctx = ctx;
    }

    @Override
    public String toString() {
        return "MessageVO{" +
                "userId='" + userId + '\'' +
                ", netId=" + netId +
                ", message=" + message +
                ", ctx=" + ctx +
                '}';
    }
}
